package com.qf.petmall.starter.square.controller;


import com.qf.petmall.starter.square.entity.SquareCarousel;
import com.qf.petmall.starter.square.service.ISquareCarouselService;
import com.qf.petmall.starter.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * animal.`square_Carousel` 前端控制器
 * </p>
 *
 * @author author
 * @since 2022-12-06
 */
@CrossOrigin
@RestController
@RequestMapping("/square-carousel")
public class SquareCarouselController {

    @Autowired
    ISquareCarouselService carouselService;

    @GetMapping("/getcarousel")
    public R get(){
        List<SquareCarousel> list = carouselService.list();
        return R.ok().put("square_Carousel",list);
    }
}
